package br.com.single.modelo.estoque;

import br.com.single.publico.Cditemtabelageneri;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@Entity
@Table(schema = "estoque", name = "cdnatureoperac")
@RooJavaBean
@RooToString
@RooJpaActiveRecord(versionField = "", table = "cdnatureoperac", schema = "estoque")
@RooDbManaged(automaticallyDelete = true)
public class Cdnatureoperac {
	
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "codigocfop",columnDefinition="cfop")
	private String codigocfop;

	
	@OneToMany(mappedBy = "cfop")
	private Set<Mvfrete> mvfretes;

	@OneToMany(mappedBy = "cfop")
	private Set<Mvnotafiscal> mvnotafiscals;

	@ManyToOne
	@JoinColumns({
			@JoinColumn(name = "tabelad3", referencedColumnName = "codigotabela",columnDefinition="bpchar"),
			@JoinColumn(name = "classinature", referencedColumnName = "elementabela",columnDefinition="classisimple") })
	private Cditemtabelageneri cditemtabelageneri;

	@ManyToOne
	@JoinColumns({
			@JoinColumn(name = "tabelad2", referencedColumnName = "codigotabela",columnDefinition="bpchar"),
			@JoinColumn(name = "operacdocume", referencedColumnName = "elementabela",columnDefinition="classisimple") })
	private Cditemtabelageneri cditemtabelageneri1;

	@ManyToOne
	@JoinColumns({
			@JoinColumn(name = "tabelad1", referencedColumnName = "codigotabela",columnDefinition="bpchar"),
			@JoinColumn(name = "condicpartic", referencedColumnName = "elementabela",columnDefinition="classisimple") })
	private Cditemtabelageneri cditemtabelageneri2;

	@Column(name = "descricfop",columnDefinition="nomegrande")
	@NotNull
	private String descricfop;

	@Column(name = "statuscfop")
	private Character statuscfop;

	@Column(name = "tipocfop",columnDefinition="flag")
	private String tipocfop;

	@Column(name = "crediticms",columnDefinition="flag")
	private String crediticms;

	@Column(name = "reducabaseicms",columnDefinition="percen")
	private String reducabaseicms;

	@Column(name = "aliquoicms",columnDefinition="percen")
	private String aliquoicms;

	@Column(name = "percenbasesubsti",columnDefinition="percen")
	private String percenbasesubsti;

	@Column(name = "incideipiicms",columnDefinition="flag")
	private String incideipiicms;

	@Column(name = "aliquopis",columnDefinition="percen")
	private String aliquopis;

	@Column(name = "aliquocofins",columnDefinition="percen")
	private String aliquocofins;

	@Column(name = "flagestoqu",columnDefinition="flag")
	private String flagestoqu;

	@Column(name = "flagfinanc",columnDefinition="flag")
	private String flagfinanc;

	@Column(name = "flagtransf",columnDefinition="flag")
	private String flagtransf;

	@Column(name = "fluxocaixa",columnDefinition="fluxocaixa")
	private String fluxocaixa;

	@Column(name = "observ",columnDefinition="observ")
	private String observ;

	
	public String getCodigocfop() {
		return this.codigocfop;
	}

	public void setCodigocfop(String id) {
		this.codigocfop = id;
	}

	public Set<Mvfrete> getMvfretes() {
		return mvfretes;
	}

	public void setMvfretes(Set<Mvfrete> mvfretes) {
		this.mvfretes = mvfretes;
	}

	public Set<Mvnotafiscal> getMvnotafiscals() {
		return mvnotafiscals;
	}

	public void setMvnotafiscals(Set<Mvnotafiscal> mvnotafiscals) {
		this.mvnotafiscals = mvnotafiscals;
	}

	public Cditemtabelageneri getCditemtabelageneri() {
		return cditemtabelageneri;
	}

	public void setCditemtabelageneri(Cditemtabelageneri cditemtabelageneri) {
		this.cditemtabelageneri = cditemtabelageneri;
	}

	public Cditemtabelageneri getCditemtabelageneri1() {
		return cditemtabelageneri1;
	}

	public void setCditemtabelageneri1(Cditemtabelageneri cditemtabelageneri1) {
		this.cditemtabelageneri1 = cditemtabelageneri1;
	}

	public Cditemtabelageneri getCditemtabelageneri2() {
		return cditemtabelageneri2;
	}

	public void setCditemtabelageneri2(Cditemtabelageneri cditemtabelageneri2) {
		this.cditemtabelageneri2 = cditemtabelageneri2;
	}

	public String getDescricfop() {
		return descricfop;
	}

	public void setDescricfop(String descricfop) {
		this.descricfop = descricfop;
	}

	public Character getStatuscfop() {
		return statuscfop;
	}

	public void setStatuscfop(Character statuscfop) {
		this.statuscfop = statuscfop;
	}

	public String getTipocfop() {
		return tipocfop;
	}

	public void setTipocfop(String tipocfop) {
		this.tipocfop = tipocfop;
	}

	public String getCrediticms() {
		return crediticms;
	}

	public void setCrediticms(String crediticms) {
		this.crediticms = crediticms;
	}

	public String getReducabaseicms() {
		return reducabaseicms;
	}

	public void setReducabaseicms(String reducabaseicms) {
		this.reducabaseicms = reducabaseicms;
	}

	public String getAliquoicms() {
		return aliquoicms;
	}

	public void setAliquoicms(String aliquoicms) {
		this.aliquoicms = aliquoicms;
	}

	public String getPercenbasesubsti() {
		return percenbasesubsti;
	}

	public void setPercenbasesubsti(String percenbasesubsti) {
		this.percenbasesubsti = percenbasesubsti;
	}

	public String getIncideipiicms() {
		return incideipiicms;
	}

	public void setIncideipiicms(String incideipiicms) {
		this.incideipiicms = incideipiicms;
	}

	public String getAliquopis() {
		return aliquopis;
	}

	public void setAliquopis(String aliquopis) {
		this.aliquopis = aliquopis;
	}

	public String getAliquocofins() {
		return aliquocofins;
	}

	public void setAliquocofins(String aliquocofins) {
		this.aliquocofins = aliquocofins;
	}

	public String getFlagestoqu() {
		return flagestoqu;
	}

	public void setFlagestoqu(String flagestoqu) {
		this.flagestoqu = flagestoqu;
	}

	public String getFlagfinanc() {
		return flagfinanc;
	}

	public void setFlagfinanc(String flagfinanc) {
		this.flagfinanc = flagfinanc;
	}

	public String getFlagtransf() {
		return flagtransf;
	}

	public void setFlagtransf(String flagtransf) {
		this.flagtransf = flagtransf;
	}

	public String getFluxocaixa() {
		return fluxocaixa;
	}

	public void setFluxocaixa(String fluxocaixa) {
		this.fluxocaixa = fluxocaixa;
	}

	public String getObserv() {
		return observ;
	}

	public void setObserv(String observ) {
		this.observ = observ;
	}

}
